﻿using System.ComponentModel;
using T4UtilityBelt.DataDesigns;
using T4UtilityBelt.UxDesigns.Bindings;
using T4UtilityBelt.UxDesigns.Controls.Renderers;


namespace T4UtilityBelt.UxDesigns.Controls
{
    public class StringControl : PropertyControl<StringControl, IStringRenderer, StringProperty>
    {
        public StringControl()
        {
        }

        public StringControl(string propertyName)
            : base(propertyName)
        {
            Text = new Bindable<string>(propertyName, BindingMode.TwoWay);
        }

        public StringControl(StringProperty property)
            : base(property)
        {
            Text = new Bindable<string>(property.Name, BindingMode.TwoWay);
        }

        #region properties

        [DefaultValue(false)]
        public bool AcceptsReturn { get; set; }

        public Bindable<string> Text { get; set; }

        #endregion properties

    }
}